﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;
using System.Net;

namespace VIB
{
    class Mailer
    {
        public static void SendMail(MailMessage mail)
        {
            SmtpClient client = new SmtpClient();
            client.Port = 25;
            client.EnableSsl = true;
            client.DeliveryMethod = SmtpDeliveryMethod.Network;
            client.Host = "smtp.gmail.com";
            client.UseDefaultCredentials = false;
            string password = "passwort";
            client.Credentials = new NetworkCredential(mail.From.Address, password);
            client.Send(mail);
        }
    }
}
